<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>formJs demo1</title>
	<script type="text/javascript" src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/Classjs.min.js"></script>
	<script type="text/javascript" src="lib/formJs.js"></script>
</head>
<body>
	<form id="demoForm" action="demo1.php" method="get">
		First name: 
		<input type="text" name="firstname" value="A" /> <br />
		Last name: 
		<input type="text" name="lastname" value="B" /> <br />
		<input id="submitButton" type="submit" value="提交"/>
	</form>
</body>
<script type="text/javascript">
var formObj = new FormObj({
	formId : "demoForm",
	isRefresh : false,
	async : false,
	subButId : "submitButton", 
    onclick : function(){
	  	alert();
	},
	callback : function(state,data,xhr,ts,errorinfo){
		if ( state == "success" ){
			console.log(data);
		}
	}
});
</script>
</html>